package cli;

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import filefinder.FileFinder;

public class Main {

	public static void main(String[] args) {

		List list = new ArrayList();
		Params params = Params.parse(args);
		FileFinder fileFinder = new FileFinder(params.getThreadPoolSize());
		fileFinder.findFile(new File(params.getFilePath()), params.getToFind(), list, params.getFinder());
		fileFinder.waitForResult();
		Iterator it = list.iterator();
		while (it.hasNext()) {
			System.out.println(it.next());
		}
	}
}
